package propotype;

/**
 * @author zhangxi
 * @date 2021/10/12
 */
public class PrototypePatterDemo {

    public static void main(String[] args) {
        try {
            Product product = new Product("product",new Component("component"));
            Product copyProduct = (Product)product.clone();
            System.out.println(copyProduct);
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
    }
}
